package com.guchenbo.nacos.spring.boot;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class NacosApplicationRunner implements ApplicationRunner {

    @NacosValue(value = "${gcb.nacos.name}", autoRefreshed = true)
    private String gcbNacosName;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println(gcbNacosName);
    }
}
